package com.googlecode.perfectable.eventable.routing;

public final class NullSink<N> implements Sink<N> {
	private static final NullSink<?> INSTANCE = new NullSink<>();

	private NullSink() {
		// no fields
	}

	@SuppressWarnings({ "unchecked" })
	public static <X> NullSink<X> create() {
		return (NullSink<X>) INSTANCE;
	}

	@Override
	public void receive(N message) {
		// swallow message
	}

}
